package com.xiaoran.springcloud.alibaba.controller;

import com.xiaoran.springcloud.alibaba.domain.CommResult;
import com.xiaoran.springcloud.alibaba.domain.Order;
import com.xiaoran.springcloud.alibaba.service.OrderServce;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {
    @Resource
    private OrderServce orderServce;

    @GetMapping("/order/create")
    public CommResult create(Order order){
        orderServce.create(order);
        return  new CommResult(200,"订单创建成功");
    }
    //http://localhost:2001/order/create?user_id=1&product_id=1&count=10&money=100&status=1

}
